<?php
class GenresModel extends CI_Model {
	function getGenre($movieid){
		$sql = "select GENRE from genres where MOVIEID = $movieid";
		$data = $this->db->query($sql);
		return $data;		
	}
	
	function getMovieId($genre) {
		$sql = "select MOVIEID from genres where GENRE = '$genre' and MOVIEID not in
				(select MOVIEID from movies where GENREID is not null)";
		$data = $this->db->query($sql);
		return $data;
	}
}
?>